#include "Stage.h"

Stage::Stage(btDiscreteDynamicsWorld* pWorld,
             btBvhTriangleMeshShape* pStageShape,
             btRigidBody* pStageBody,
             Ogre::SceneManager* pSceneManager,
             Ogre::SceneNode* pStageNode,
             Ogre::Entity* pStageEntity) :
  _pWorld(pWorld), _pStageShape(pStageShape),
  _pStageBody(pStageBody), _pSceneManager(pSceneManager),
  _pStageNode(pStageNode), _pStageEntity(pStageEntity) {}

Stage::~Stage() {

  _pWorld->removeRigidBody(_pStageBody);
  delete _pStageBody->getMotionState();
  delete _pStageBody;
  delete _pStageShape;

  _pSceneManager->destroySceneNode(_pStageNode);
  _pSceneManager->destroyEntity(_pStageEntity);
}
